#!/usr/bin/python
# -*- coding: UTF-8 -*-
 
import os
import gen_reg_list as svd_list
import gen_reg_excel as svd_excel
import gen_reg_latex as svd_latex


if __name__ == "__main__":
    current_dir = os.getcwd()
    up_dir = current_dir.strip(current_dir.split("\\")[-1])
    svd_name = up_dir + "Test\\R2401.svd"
    # svd_name = "R2401.svd"
    excel_name = "R2401_reg.xlsx"
    latex_name = current_dir + "\\datasheet\\R2401_latex.tex"

    svd_list.gen_reg_list(svd_name)
    svd_excel.gen_reg_excel(svd_name, excel_name)
    # svd_latex.gen_reg_latex(svd_name, latex_name)
    # svd_latex.line_str_pre(svd_latex.tmp_str)
    print("Finish getting svd information.")


